package com.hksj.app.controller;


import com.hksj.common.core.model.Rest;
import com.hksj.em.dto.create.SurgicalDeviceControlDTO;
import com.hksj.app.service.OrEquipmentService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.validation.Valid;

@Api(tags = "手术室设备控制")
@RestController
@RequestMapping("/api/orEquipment")
public class OrEquipmentController {

    @Autowired
    private OrEquipmentService service;

    @ApiOperation(value = "手术室设备控制")
    @PostMapping("/equipmentControl")
    public Rest equipmentControl(@RequestBody SurgicalDeviceControlDTO dto) {
        Boolean result = service.equipmentControl(dto);
        return Rest.ok(result);
    }

}
